package com.uidp.domain;

import com.acsior.dac.exeption.DataAccessException;
import com.acsior.sbc.exception.BusinessException;
import com.acsior.sbc.exception.ValidationException;
import com.acsior.sbc.impl.hibernate.HibernateBusinessObject;
import com.uidp.hibernatelayer.ModulUsergroupsDAO;
import com.uidp.hibernatelayer.ModulUsergroupsVO;

public class ModulUsergroups extends
		HibernateBusinessObject<ModulUsergroupsVO, ModulUsergroupsDAO> {

	private Modul modul;
	private Usergroups usergroups;

	public ModulUsergroups() throws BusinessException {
		super();
	}

	public ModulUsergroups(ModulUsergroupsVO h) throws BusinessException {
		super(h);
	}

	/** @see PersistentObject#initialize() */
	@Override
	protected void initialize() throws BusinessException {
		super.initialize();
		setModul(new Modul());
		setUsergroups(new Usergroups());
	}

	@Override
	protected void setValues(ModulUsergroupsVO h) throws DataAccessException {
		h.setModul(getModul().findData());
		h.setUsergroups(getUsergroups().findData());

	}

	@Override
	protected void copyProperties(ModulUsergroupsVO d, boolean deepCopy)
			throws BusinessException {
		setModul(new Modul(d.getModul()));
		setUsergroups(new Usergroups(d.getUsergroups()));

	}

	@Override
	protected void validate() throws ValidationException {
		// TODO Auto-generated method stub

	}

	@Override
	protected Class<ModulUsergroupsDAO> getDAOClass() {
		return ModulUsergroupsDAO.class;
	}

	public Modul getModul() {
		return modul;
	}

	public void setModul(Modul modul) {
		this.modul = modul;
	}

	public Usergroups getUsergroups() {
		return usergroups;
	}

	public void setUsergroups(Usergroups usergroups) {
		this.usergroups = usergroups;
	}

}
